package com.ttg.common.aa;

/**
 * @author ZQ
 * @version 1.0
 * @Description
 * @date 2020/12/24 9:42
 */
public enum OrderStatusEnum {
    TYPE_1(1,"交易成功"),
    TYPE_2(2,"待支付"),
    TYPE_9(9,"待输入密码"),
    TYPE_4(4,"已取消");
    private Integer value;
    private String desc;
    OrderStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static OrderStatusEnum getByCode(Integer value){
        for (OrderStatusEnum statusEnum : OrderStatusEnum.values()) {
            if(statusEnum.getValue().equals(value)){
                return statusEnum;
            }
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
